package tmt.usercenter.web.domain.vo;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * 菜单项视图对象。
 */
@Getter
@Setter
@NoArgsConstructor
public class MenuItem {

	private Long id;

	private String name;

	private String authority;

	private String icon;

	private boolean visible = true;

	private boolean active = false;

	private MenuItem parent;

	private List<String> accessPoint = new ArrayList<>();

	private List<MenuItem> children = new ArrayList<>();

	public MenuItem(Long id, String name, String authority, String icon,
					boolean visible, boolean active, MenuItem parent, List<String> accessPoint){
		this.id = id;
		this.name = name;
		this.authority = authority;
		this.icon = icon;
		this.visible = visible;
		this.active = active;
		this.parent = parent;
		this.accessPoint = accessPoint;
	}

}
